Open
Conversation
isuh88
reviewed
May 3, 2024
Comment on lines
46
to
65
| const vote = async (val) => { | ||
| try { | ||
| // ### TO DO ### | ||
| // ############# | ||
| const response = await axios.post( | ||
| "https://api.thecatapi.com/v1/votes", | ||
| { | ||
| image_id: image.id, | ||
| sub_id: userId, | ||
| value: val, | ||
| }, | ||
| { | ||
| headers: { | ||
| "Content-Type": "application/json", | ||
| "x-api-key": | ||
| "live_Iyhi1ILrF0FD1vlsdHpX4CYBM37yG1ZXsUjP58Jx4Wov7qsp27cZmsuBjMt0HYVo", | ||
| }, | ||
| } | ||
| ); | ||
| } catch (err) { | ||
| console.log(err); | ||
| } |
Contributor
There was a problem hiding this comment.
앗 아까 쓰는걸 깜박했는데, 지금은 투표 후에 요청은 post로 잘 전송되나 새로운 고양이 이미지가 다시 불러와지지는 않아요! getImage()를 통해 vote를 호출하여 투표를 완료하면 다음 고양이 사진이 보이도록 수정하면 좋을 것 같네요 :)
charijyard
reviewed
May 3, 2024
charijyard
left a comment
There was a problem hiding this comment.
제가 아이디를 안 알려드려서 assignee가 잘못 지정된 것 같아요 ㅎㅎ 저(박민서)의 아이디는 charijyard입니다 🙂! 그리고 코드도 저한테는 완벽해 보이네요 ~~~ 고생하셨습니다앙
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💎 과제 구현 설명
🏁 PR 체크리스트
🖼️ Screenshot / Video
🙌 Issue